#include<stdio.h>

#define ONE (1<<0) //0001   1
#define TWO (1<<1) //0010   2
#define THREE (1<<2) //0100 4
#define FOUR (1<<3) //1000  8


void show(int flags)
{
    if(flags&ONE)   printf("hello function1\n");
    if(flags&TWO)   printf("hello function2\n");
    if(flags&THREE) printf("hello function3\n");
    if(flags&FOUR)  printf("hello function4\n");
}
int main()
{   
    printf("----------------------\n");
    show(ONE);
    printf("----------------------\n");
    show(TWO);
    printf("----------------------\n");
    //使用或 0001|0010=0011 ，传上去后遇到1和2都为真
    show(ONE|TWO);
    printf("----------------------\n");
    show(ONE|TWO|THREE);
    printf("----------------------\n");

    return 0;
}
